/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package handler;

import java.sql.*;
import java.util.Properties;
import java.util.logging.Level;
import java.util.logging.Logger;
import com.mysql.jdbc.Driver;

/**
 *
 * @author ifan
 */
public class database {
    private String url = "jdbc:mysql://localhost:3306/";
    private String dbName = "onair";
    private String driver = "com.mysql.jdbc.Driver";
    private String userName = "root";
    private String password = "";

    public database() {
        
    }

    public Connection getConnection() throws SQLException, InstantiationException, IllegalAccessException, ClassNotFoundException {
        Connection conn = null;

        Class.forName(driver).newInstance();
        conn = DriverManager.getConnection(url+dbName,userName,password);
        return conn;
    }
}
